package com.zxshhy.controller;

import com.zxshhy.service.BalanceService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zxs
 */
@RestController
@RequestMapping("/balance")
public class BalanceController {
    
    @Resource
    private BalanceService balanceService;
    
    @RequestMapping("/debit")
    public Boolean debit(String userId, int money) throws Exception {
        // 用户账户扣款
        balanceService.debit(userId, money);
        return true;
    }
    
}
